package ExpressDelivery;

public class SendTask {
    private String number;
    private double goodsWeight;
    //?
    public SendTask(){
        super();
    }
    //初始化类里的属性变量
    public SendTask(String number,double goodsWeight){
        this.number = number;
        this.goodsWeight = goodsWeight;
    }
    public void setNumber(Stirng number){
        this.number = number; 
    } 
    public String getNumber(){
        return number; 
    }
    public void setGoodsWeight(double goodsWeight){
        this.goodsWeight = goodsWeight; 
    } 
    public String getGoodsWeight(){
        return goodsWeight; 
    }
    //print imformation(before)
    public void sendBefore(){
        System.out.println("订单开始处理，仓库验货中。。。。");
        System.out.println("货物重量：" + goodsWeight + "kg");
        System.out.println("货物检验完毕！");
        System.out.println("货物填装完毕！");
        System.out.println("运货人已通知");
        System.out.println("快递单号：" + this.getNumber() ); //不知道为什么要加this
    }
    //print imformation(now)
    public void send(Transportation t,GPS tool){
        System.out.println("运货人" + t.getAdmin() + "正在驾驶编号为：" + t.getNumber() + "的" + t.getModel() + "发送货物！");
        t.transport();  //一定要使用
        String showCoordinate = tool.showCoordinate();
        System.out.println("货物当前的坐标为：" + showCoordinate);
    } 
    //print imformation(after)
    public void sendAfter(Transportation t){
        System.out.println("货物运输任务已经完成!");
        System.out.println("运货人" + t.getAdmin() + "驾驶编号为：" + t.getNumber() + "的" + t.getModel() + "已归还！"); 
    } 
}
